From 61f9e17cd707eca606318c8ce9d14c67b7ec62c4 Mon Sep 17 00:00:00 2001
From: Daniel Kolesa <daniel@octaforge.org>
Date: Sun, 22 Jan 2023 00:32:03 +0100
Subject: [PATCH] hack: explicitly link libraries to openmp

because libtool is worthless garbage, it rewrites c++ linkage in
a way that does not link openmp in
---
 source/SoundTouch/Makefile.am    | 2 +-
 source/SoundTouchDLL/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/SoundTouch/Makefile.am b/source/SoundTouch/Makefile.am
index eac15a9..acdfe00 100644
--- a/source/SoundTouch/Makefile.am
+++ b/source/SoundTouch/Makefile.am
@@ -65,7 +65,7 @@ libSoundTouchSSE_la_CXXFLAGS = $(AM_CXXFLAGS)
 endif
 
 # Modify the default 0.0.0 to LIB_SONAME.0.0
-libSoundTouch_la_LDFLAGS=-version-info @LIB_SONAME@
+libSoundTouch_la_LDFLAGS=-lomp -version-info @LIB_SONAME@
 
 # other linking flags to add
 # noinst_LTLIBRARIES = libSoundTouchOpt.la
diff --git a/source/SoundTouchDLL/Makefile.am b/source/SoundTouchDLL/Makefile.am
index f867184..1d02f05 100644
--- a/source/SoundTouchDLL/Makefile.am
+++ b/source/SoundTouchDLL/Makefile.am
@@ -34,7 +34,7 @@ libSoundTouchDll_la_SOURCES=../SoundTouch/AAFilter.cpp ../SoundTouch/FIRFilter.c
 # Compiler flags
 
 # Modify the default 0.0.0 to LIB_SONAME.0.0
-LDFLAGS=-version-info @LIB_SONAME@
+LDFLAGS=-lomp -version-info @LIB_SONAME@
 
 if X86
 CXXFLAGS1=-mstackrealign -msse
-- 
2.39.0

